package com.example.teesystem.entityDto;

import com.example.teesystem.entity.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AssistantMessage {
    /**
     *  课程助教ID
     */
    private Integer id;

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 助教ID
     */
    private Integer assistantId;

    /**
     * 助教权限
     */
    private Map<Integer,String> permission;

    /**
     * 创建教师ID
     */
    private Integer uploadId;

    /**
     * 创建教师姓名
     */
    private String uploadName;

    public AssistantMessage(User user){
        this.uploadId = user.getId();
        this.uploadName = user.getMyName();
    }
}
